package com.ganbo.thread;

import org.openjdk.jol.info.ClassLayout;

/**
 * 通过openjdk工具类打印对象在内存的布局
 * Created by gan on 2020/5/19 23:20.
 */
public class ObjectLayoutDemo {

    public static void main(String[] args) {

        ObjectLayoutDemo old = new ObjectLayoutDemo();

        //打印对象的内存布局
        System.out.println(ClassLayout.parseInstance(old).toPrintable());

    }
}
